<?php

class Banner_model extends Model{

	var $table_name = 'banner';
	
	function Banner_model()
	{
		parent::Model();
	}
	
	function get_row($field,$where_field = '',$where_value = '')
	{
		$this->db->select($field);	
		if($where_value<>''):
			$this->db->where($where_field,$where_value);
		endif;
		$this->db->where('status','A');
		$query = $this->db->get($this->table_name);	
		return $query;
	}	
	
	function get_rows($field,$where_field='',$where_value='')
	{
		$this->db->select($field);	
		if($where_field){
			$this->db->where($where_field,$where_value);
		}		
		$this->db->where('status','A');
		$this->db->orderby('sort','ASC');

		$query = $this->db->get($this->table_name);	
		return $query;
		
	}

	
}

/* End of file News_model.php */
/* Location: ./system/application/models/blog_model.php */	
?>